let currentId = 1
let allIdList: number[] = []

export default {
    create() {
        let id = ++currentId
        allIdList.unshift(id)
        return id
    },
    remove(id: number) {
        allIdList = allIdList.filter(a => a !== id)
    },
    isTop(id: number) {
        return allIdList[0] === id
    },
}